mode option to copy existing or set file permissions. Closes GH-97.
Add test for mode