Checking of built packages made more robust

Use ls rather than [] (test) to check