trailing backslash

Added checking for a trailing backslash for otuput directory, missing it
seems to cause problems