Add flag that makes the program run in test mode

It is often nice to be able to run a program as normal but without
making any changes. Add a flag --dry-run that when set makes the program
run without actually doing anything to the file system.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>