For those who may run into the same issue I did in the future...
If you enable debug and see that a script is returning 512 you need to add "#!/usr/bin/python" to the beginning of your script.

Read More...