Fixed writeObject() not creating paths correctly.