Don't attempt to match in namespace if path is invalid

https://github.com/hearsayit/HearsayRequireJSBundle/pull/30 introduced a bug which causes a warning `strpos(): Empty needle` when attempting to match a namespace for an invalid module path.