Mocha workaround

Workaround to handle mocha tests when running from file.