There's no support for writing a Dockerfile with a statement to modify files on the host during docker build. You should keep in mind that the actual image build might happen in another Docker engine than the one where you kick off the build (the Dockerfile along with its build context are uploaded to the Docker Engine).
There are at least two options here:
1) Write a RUN statement that uses a BUILD_ARG to reach out to another host and triggers some action there. I consider this as a very bad hack, so I prefer not to be more specific about how that statement might look like.
2) Perform the desired actions an a normal docker run, where you can mount a host's directory as volume into the container.
I haven't looked into the https://github.com/genuinetools/img tool, yet. It also aims at building images, but might provide more possibilities during build time.
VOLUME <your_folder_inside>, after builddocker run -v <your_folder_inside>, and after that your host dir/var/lib/docker/volumes/<your_folder_inside>`?