Added a "system" object for access to the outside world

This should make unit-testing easier.
Include cwd in %PATH% search on Windows