Further improved the command line for unexpected situations, added in
flags to the 'ls' search argument.