This seems a little naïve. What if someone passes an absolute path? [path.resolve](http://nodejs.org/api/path.html#path_path_resolve_from_to) is what you want.

```js
var filename = path.resolve(opts.filename);
```