If I follow this steps to create a new app:
Rubens-MacBook-Pro:~ rlopez$ npm install -g cordova ionic Rubens-MacBook-Pro:~ rlopez$ ionic start myApp tabs Rubens-
Just encountered the same issue, and I don't think it has anything to do with sudo - that command is simply missing the execute permission
chmod +x hooks/after_prepare/010_add_platform_class.js