add "w" to getopts, otherwise running fio.sh with the -w argumet failts with "illegal option -- w"