Make permalink service more testable
Add sinon for mocks, spies etc.
Add permalink service tests
Fix URL construction in permalink service