don't include cmn_fs* functions in basic shell mode
fixed invalid return value in cmn_fs_get_type
small style changes
fixed potential double dm_closedir calls