fix errros

Signed-off-by: Mattias Andrée <maandree@operamail.com>
typo

Signed-off-by: Mattias Andrée <maandree@operamail.com>
use os.path.lexists and not os.path.exists

Signed-off-by: Mattias Andrée <maandree@operamail.com>
empty directories should be kept for filesystem

Signed-off-by: Mattias Andrée <maandree@operamail.com>