Fix errors demo to actually fail jobs when exeusted as script
When not mocked, run demo scripts instead of importing main
Other test improvements
#!/usr/bin/python -> #!/usr/bin/env python