Merge pull request #151 from adamretter/develop

Fixes for permissions assignments when copying resources
Merge pull request #152 from adamretter/develop

New setUid and setGid functionality
[bugfix] Set the lexical handler so that Comments etc are not lost