Only apply url_param to URL's if its present in the current URL

This is a suggested solution for issue #9 submitted by @somebody32.