move some util functions (handleCmd and filterImages) to a utility module
fix cleanup script, now using handleCmd and filterImages from teca.utils