bash: fixes to httpd.

- Make httpd a function so that python is not invoked on each shell init.
- Check for python before defining the function.
- Make the version check safe against zero output from python.