Fix folder check when creating an archive