Fixed the mangled IFS variables and missing S switch in getopts