use single square brackets for testing public directory existence