psci: validate imports when using :i

fixes #609
validate imports correctly
Merge pull request #635 from Bogdanp/master

psci: validate imports when using :i