Xulai/broccoli-imagemin — pull request #3 by eploko (2014-11-16 11:03:59+00:00)
Title: Fix pathnames handling

Tried to use the plugin today and stumbled upon the fact it used broccoli tree objects as a string. That I believe was okay in the old days, but now it leads to bailing out along the lines of:

```
[broccoli-debug] [TreeMerger tree] Error: ENOENT, no such file or directory './[object Object]/images/logo.svg'
File: images/logo.svg
Error: ENOENT, no such file or directory './[object Object]/images/logo.svg'
at Object.fs.statSync (fs.js:695:18)
at imageminFilter.processString (.../node_modules/broccoli-imagemin/index.js:57:17)
at imageminFilter.processFile (.../node_modules/broccoli-imagemin/index.js:89:31)
...
```

The PR fixes this by propagating the srcDir variable from the processFile method into the processString call.
Plus, the file paths are now constructed with path.join(...) calls, which is safer than concatenating strings.

Hope this helps and you would merge it. Cheers. :)