Added global flag, replaced redundant redirection.

Not using the 'g' (global) flag only replaces the first match on a line.  The 'g' flag will replace all matches.
Merge pull request #25 from adelviscio/patch-1

Added global flag, replaced redundant redirection.