Use getopt for option parsing in command put

Bug detected : arguments should not be allowed before first option