Format URLs in auth requests; add unit tests

Remove trailing / from ownCloud installation locations input
in preferences so that appending the remainder of the path to
the news app does not add superfluous forward-slashes.

Add a rudimentary unit test file, which currently only tests
the function that achieves the task above (formatLoc).