Terminal Error: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug - Unable to Repair Permissions
I had the same problem with my dev machine. After several hours of trying anything other than a reinstall I finally realized that was the only choice. It should have been the FIRST choice. SO EASY!


Back up the critical data (just in case) 
Enter the recovery mode by pressing cmd+r at start up
Choose "Reinstall Mac OS X"


That's it. When my computer restarted I was prompted for my Apple ID credentials and then my user loaded like normal, with a working Terminal, even. I didn't need to reinstall / restore anything. The whole process (including the user folder backup) took about 45 min.

Final step, remove all of the sketchy utilities installed trying to fix this without a reinstall.