Fixed package file resolution. Fixes #718, #720.