Try to use full path in HashAndInsertObject in bare repositories. Fixes #285.