Added '--dry-run' argument and switched to using argparse.