1. code cleanup
2. only rebuild openstack connection if authok is false
3. use in-memory script file so slaves don't barf with permission errors when writing to disk