File permissions fixed for copying

Replaced shell line with built in Ruby FileUtils.copy. Bugs when copying other files.