BOM detect and remove (py2k and py3k) as discussed in issue #600