improve cloneFileRecord and add tests, add getFileName with tests, improve getFileExtension with tests