galleryURL should not have hostname in it

otherwise the AJAX endpoint doesn't get added
Added test
Remove unnecessary line
Merge pull request #1480 from guardian/gallery-endpoint-fix

Gallery endpoint fix