Update test.js

Added test to all the special character conversion.
Update index.js

Replaced `.replace()` with switch cases for better performance.
Benchmark: http://jsperf.com/wildcard-glob-switch-replace
Update index.js

Converted tabs to 2 spaces.
Merge pull request #1 from LarryBattle/master

Use a loop and look at each character individually instead of using regexps.