Add tests for #putDirectory
Make `local.setRevision` private and use from put methods (refs #535, fixes #543)