Updating the library to support new style repo paths whilst maintaining compatibility with legacy CTX paths. Also removing calls to extra the CTX number. Was not needed in the legacy case, and is no longer there in the new path names.

Signed-off-by: Rob Dobson <rob@rdobson.co.uk>