added tests for getfiles, setfiles and the writing of the metadata