replace given/when by for/if to avoid experimental warnings on perl 5.16
fix the exit code so it's equal to zero when the command was successful
add support for the '-f' option of installf and removef