I recommend this be stickied.
EDIT:
I found a... well, an oddity let's say.
When using Ghost_CanMove with the diagonal directions, it's possible to get wrong results.
The reason is that it simply composes the two other directions. For example, say you're doing this:
Ghost_CanMove(DIR_LEFTUP,1,0);
The result will be essentially (Ghost_CanMove(DIR_LEFT,1,0) && Ghost_CanMove(DIR_UP,1,0));
However, if the enemy found itself in a scenario like this:
|X|
___ *
Then both LEFT and UP are true, but LEFTUP is not.
Thus, oddity.