Forgot a $window... also beefed up the tests to account for the $window.history.back
Added spyOn, a jasmine global, to the jslinter.