Various

Various miscelaneous fixes.

- Changed API for initializing the shell
- Ensure commands are only registered if they are supported
- Added validation for file import (so that you cannot specify f.e. `.` or a directoy/symlink)