Added getting versioned models and creating version, fixed creating repo

Fixed creating repository with mkdirp - it yields with optional err and
directory path, not only with err. Versioning is becoming functional -
versions can been loaded and non-versioned model can been versioned into
new repo.