Add tests for nested and remote refs
Merge pull request #29 from gazpachoking/more_ref_tests

Add tests for nested and remote refs