Remove empty parent directories after image deletion (fixes #15)