Massive rewrite to use hard links.
Massive rewrite to use hard links.

This also rationalises lots of the logic in a number of functions, but
particularly grab_file().

EOL/eol_php_code,EOL/eol_php_code,EOL/eol_php_code,EOL/eol_php_code,EOL/eol_php_code