Avoid writing bogus unitcell info to disk for trajs without PBCs

- [x] Add test that fails for the broken behavior
- [ ] Fix behavior