Make absolute paths relative to working directory.

NSURL’s methods resolve relative paths with respect
to the directory from which the script is run.
We want them to be resolved with respect to the
directory containing the makefile instead.
Make _fileURL() more robust.

We make sure the the working path is always set to
an absolute path that ends with a trailing slash.
_fileURL() is rewritten to deal with paths more
robustly, handling relative paths better (since
they are built with URLWithString:relateiveToURL),
but also correctly treating paths with tilde or
dots.
Simplify absolutePath().

Now that we have changed _fileURL(), we can rely
on NSURL to resolve the path correctly.
Add more tests for absolutePath().