Update formatter.py

fixed "re.sub can not use a string pattern on a bytes-like object" problem under sublime text 3 on OSX 10.8.4