Fix shortenUrl helper to not crash when URL doesn't include any "/".