Move method processListOfFiles to utils module

Also, renames parseFlags as something more generic: encapsulate, with
an alias asList, which puts in a list if the arguments is not a list,
otherwise just returns the list value