:+1: - a better implementation than what I had in mind.

Are we sure the `path` variable will never have a query string already?