Grunt: tidy up JS syntax and also prevent CSS LESS "dev" folders being copied into build when running `build-prod`.

Fixes #135
Templates: fix incorrect output escaping for . See #134
Remove some extract() use
Don't return null for functions that say they return strings
phpdoc update in achievements permalink function
Another return string instead of null fix
Output escaping enhancements. Fixes #134

There are no known security. issues but this should make things more
secure.