Added test case for direct grunt CLI usage. Minor refactor