Remove the query string from the path's extension if one exists. Fixes #75

Removes the query string from the path's extension.