Fixed bug where a file was found, but then was removed before it coud be accessed.
Added test for accessing a file.