Handle unexpected failure of dd

Probably not the cleanest or best way to handle it, but better than nothing. I believe this fixes bug #5.