Modified the code to use a central Repo for commits

Checkouts are taken from there.
Checkout command now if a version number is going to be specified. If
no, this it gets the latest version. If yes, then it retrieves that
version.

two helper functions added. countFileVersions and getPathToFileVersion