Added mockFiles flag wich enables one to mock read/write of files and directorys. Also adding tests for this functionality