Fixed two segmentation faults others

Fixed the segmentation fault when nothing is entered and when a string
containing a / is entered but a file cannot be found.

Changed behaviour to be more consistent with the linux shell.