Fixes filename regex error.

Resolves #250.
Merge pull request #251 from couchbaselabs/issue-250

Fixes filename regex error. Adds additional unit tests.