Modulized python startup point

- Simplified url handling in python starting point. SERVER should be set without trailing path separator
- Wrapped get/post in reusable functions
- Wrapped sample code in main() function so that importing this module doesn't cause unintentional side effects
- Added exceptions to help debug configuration