[FIX] Remove getopt and more erlangish ;-) /cc @benoitc