updated ncthis's PR to use grunt file api methods, added tests