Move convertToValidPath to to_valid_name in osextra