Update protocol/Directory.h

Updated the previous fix only by making it more generic.