Allow writing input script from Python session
This implements the requested feature in issue #145. The write_script
method now gives you a way of dumping out all used commands into a
LAMMPS input script file.
Note: this also dumps all commands which are indirectly issued by PyLammps