Preserve file permission

This fixes #5.