Fixed joinClause check in TQuery

Signed-off-by: Tom Wright <tom@inflatablecookie.com>
Added join clause check in TQuery

Signed-off-by: Tom Wright <tom@inflatablecookie.com>
Renamed arch plug to directory

Signed-off-by: Tom Wright <tom@inflatablecookie.com>