Gets previous path of the URL
urlBack("https://en.wikipedia.org/wiki/ECMAScript"); // "https://en.wikipedia.org/wiki"
urlBack("https://en.wikipedia.org/"); // "https://en.wikipedia.org"
urlBack("https://en.wikipedia.org"); // "https://en.wikipedia.org"