fixed string encoding in path checking. fixes #165