Clean directory in tests using node to avoid cross platform issues

Deletes the hard coded test files and adds more robust integration tests in a more clear format.