Fix trigger directory detection code
Patch by Vijay, reviewed by jebllis for CASSANDRA-5826