More Grunt refactoring, looking good now.
Added missing test for file API.