new feature added: parameter --num-backups to specify number of backups, threat file as main module

Hi there!
I added a feature to specify maximum number of backups to keep in target directory. For me this is working so far. Default behaviour is to keep all backups (--num-backups 0). I also rearranged the code a bit to have a main python module.