python: return error messages
Basic error handling in client

Also: exec fills $output with an array? Go home PHP, you're drunk...