Improved path handling.
Added interupt handler for clean exits.