Exposing compareFiles & waitForTests

So this is an attempt to try and expose the functionality of resemblejs in a generic fashion so you can give phantomcss 2 image urls to compare against and it would output .diff/.fail files for the times you want to compare 2 different screenshots with each other. I'm using this functionality to turn on and off certain stylesheets and verify that the screenshots I'm taking all look the same. 

To accomplish this, I had to rewrite a larger portion of the code base than I wanted because of the var tests = [] logic that determined when tests were done. Instead, I wrote and explosed a waitForTests() function that would scan the tests structure counting the "fail", "success", or "error" to determine when all tests were complete.

Any feedback would be appreciated, I've been running this locally without problem.