Update the last modified CSS code to handle non-root working directories.
Shamelessly steal bjori's code to handle JS caching as well.