Fix tests, refactor some code

Hello,

So I needed your module, and I thank you for your work.
When I saw the tests were broken, I couldn't help but to look at the code. Well, I may have done too much, but I let you decide on that.

If you have some remarks about my coding style, please let me know!

List of changes:
* Moved both files `index.js` and `test.js` to their respective directories.
* Re-factored tests to use the same a function testing both stream and buffer modes
* Styling improvements for `index.js`
* Updated dependencies
* Improved the gulpfile, replaced deprecated code

Cheers,

Antoine