Allow parent to be the parent id, along with name.

Also, add tests to check if parent is correctly parsed. Fixes #142.