unit tests for FileManager

Hi Doug,

I wrote some unit tests to verify the behavior of FileManager. Please
see the attached patch or

Some, but not all, of the tests depend on my pending patch on virtual
directories, which is in your review queue.

Would you be able to review the tests? Thanks!

file-manager-test.patch (8.93 KB)

Zhanyong, these tests look great, thanks!

  - Doug