Updated issue with opening directory

Updated to not panic if native encodings cannot be found