Optimize escapeBOM
Expose original fs functions