ext/session/mod_files.sh fix

Patch for line 13 "integer expression expected". 

Tested in bash from mac os, centos, redhat

Added some facility and feedback