Improve the handling of homes that are symlinked

Given that the code uses castle_dir.realpath for checks, using expand_path for home_dir can cause unexpected results in cases the home directory includes a symlink (eg. /home -> /usr/home).

Fixes #86