Set file perms at the correct time [fixes #79]