More _shell_code.py updates

- _chomp returns, don't want to strip tabs
- switch to platform.system() instead of os.name