Fix PosixPath being passed to HuggingFace `save_to_disk` (which does not accept it)
Description
HuggingFace save_to_disk takes PathLike type which is defined as str, bytes or os.PathLike. imitation.util.parse_path always returned pathlib.Path which is not one of these types. This commit converts pathlib.Path to str before calling HuggingFace save_to_disk.
Related issue #852
Testing
Passed a path in both str and Path forms to save for Trajectory and TrajectoryWithRew. Expanded testing of serialize by adding additional save then load tests.
Fixed in https://github.com/HumanCompatibleAI/imitation/pull/831#issuecomment-2574448401 before I saw this PR, won't close this because the unit tests may be useful. However this project is not actively maintained by anyone anymore so not clear if any code owner will review & merge this in the near future