Improve url handling for git and tar deployment types.