added --startdir to command line arguments.
fix crash on going to first & last images on an empty directory.