Make the test work on older ubuntu
Correcting generic method to allow copy of file, and adding unit test to check it