Pulled getopt.erl from HEAD of github.com/jcomellas/getopt