Added getDir implementation.