Fixed a bug in sanitize method

There was an IndexOutOfBoundsException when the last character of the
input string was a backslash.
Added getter and setter for output_directory_