Ensure the pkg directory exists before running tests