added --dry-run option

This adds --dry-run support as requested in #1022.

I would need some help as to where to test this feature...