fixed deletion of temporary files [ci skip]
added test for sessions and file creation