Use popen library for running external process instead of os.system.  Th...

...e later of which is really difficult to use when you need to escape command arguments.  Like say a sql query.