Stop uploading empty directories

Fixes #429