Updated transformers.js to gather directories in a hash

Was previously appending duplicates for every file.
Filtering out reference file from itself, but not from other tasks, resolves #148
Merge pull request #149 from nexussays/master

Fix for references.ts being ignored by transforms