Changed to a looped removal using the file module

File module used with a loop is replacing the shell module for removal
of files and directories, as this is a safer method of cleanup.