Try to track the capabilities of our outputdir filesystem.

For example, don't chmod if the filesystem dosen't support chmod, and
don't rename over files if that's not supported (this functionality was
already in place).

Should fix #1061
Related to #1055 (we could add a mtime capability flag)