Added tests for DirResource.
Added tests for DirResource. Closes #17.