Fixes shell detection in case $0 doesn't contain a path

See issue #63