Support for custom tempfile creation helpers

Having tempfiles at the same place as the actual file interferes with
the build systems. Eg: grunt/gulp watching on all .js files. Hence, the
copy should be allowed to exit in a different location.

Default behaviour still stays though.