Added initial version of the script

This represents a working script with hard-coded paths, but with all
variables at the top, so it should be easily customizable. Next step
would be to use getopt and have proper command-line argument parsing, as
well as to improve retention code logic.