fixed -o option when only a directory was specified