Fixes creation of double short urls.
Adds more unit tests.