Always return a path from resolveRunfiles (#30)
Always return a path from resolveRunfiles (#30)

There were two problems in the original implementation of `resolveRunfiles`:

- `pathSegments` was not checked for empty strings, so you could get bad paths like `'karma//node_modules/karma/bin/karma'`
- It presumed that if `runfilesManifest` exists, the path must exist in that manifest.

Now, it strips empty path segments, and will return `defaultPath` if the requested path is not present in the manifest.

Fixes alexeagle/rules_karma#3.
bazelbuild/rules_nodejs,bazelbuild/rules_nodejs,alexeagle/rules_nodejs,bazelbuild/rules_nodejs,alexeagle/rules_nodejs,alexeagle/rules_nodejs,bazelbuild/rules_nodejs,bazelbuild/rules_nodejs,alexeagle/rules_nodejs