Fix custom grunt tasks. Closes #307.