Fix typo in querying prompt dir

Apologies for wasting your time - silly typo when splitting the code up. Fixed now.