added iso8601 check and fixed getopts and exits in mild.sh