Fixes a dummy writer condition in sam do

Previous version was throwing errors when parsing directories with
single elements (one sequence, one image or one directory )
Fixes #257 #271