correctly handle regex typed options in generate_cmd_line

@wpoely86: this will help with https://github.com/hpcugent/easybuild-framework/pull/959

@JensTimmerman, @stdweird: please review?