Cosmetic
* Fixed bug #239
* Added unittest to avoid more bugs in shell handler