Refactor lib to use gulp streams. Improve tests

Refactor lib not to write anything to disk. This improves performance and testability.
This will introduce breaking changes in next version if you use it as gulp module. The output should be written using gulp.dest instead of using styleguide parameter.