added (optional) support for 6d facedir in dir_to_facedir and added facedir_to_dir