Fixes #7 Fixes #8, fixed minor bugs

$cpt_relations is populated everytime cptr_get_relations_ids is invoked.
also posts array is initialized with empty array.