Save file permissions

Added check so that any prefixed files will inherit the perms set
on the original.