Right now cleanup is partially broken:
If the tmppath exists, then its content is removed at the end as expected. However, if the tmppath is missing then it is created but nothing is removed.
Change this to remove the directory including its content at the end when the directory was created but stick to removing just the content if the directory existed before genimage was called.
Right now cleanup is partially broken: If the tmppath exists, then its content is removed at the end as expected. However, if the tmppath is missing then it is created but nothing is removed.
Change this to remove the directory including its content at the end when the directory was created but stick to removing just the content if the directory existed before genimage was called.
Fixes: #237