tests - switching to sync file loading

some weird issue on my env
overriding string.replace to handle potential collisions with backreferences

ugh, regex at 2.30am sucks balls. fixes
https://github.com/NodeBB/NodeBB/issues/2116