Improve error handling and error messaging

At this point we know that the string syntax is "<username>/<repository>" so there is no need for regexp matching,
and I think it is easier to understand what we actually want to do if we use split.