fixed getopts

getopts is now parsing arguments as expected

Signed-off-by: Andrej Manduch <amanduch@gmail.com>
default time regex in awk replaced with custom

Signed-off-by: Adrian Matejov <a.matejov@centrum.sk>