Fix for static path parsing

When a url contains a query parameter it gets incorrectly parsed
when replacing the /static portion.

This fix handles urls with query parameters.
Merge pull request #1396 from edx/dcadams/fix_static_paths

Fix for static path parsing