Add tests for #putDirectory