Functions Details:
Quotes a (file-) name to remove illegal characters and keep it
within a reasonable length for the filesystem.
The md5 hash function is used if the length of the name after quoting is
more than 100 characters. If it is used, then as many characters at the
start of the name as possible are kept intact, and the hash appended to
make 100 characters.
Do not pass filenames with meaningful extensions to this function, as the
hash could destroy them.
Open a file for writing. Create all intermediate directories.
Copy src to dest, if dest doesn't exist yet or is outdated.
This function joins `prefix` and `path`, irrespectively of whether
`path` is absolute or not. To do this portably is non-trivial.