pathname should substr from prefix, not suffix
add test related dependencies, ignore test/public dir