Use more clean/clear method for building paths

This also fixes issues with symlinked items causing
causing the interpreter to fail with an ENOENT if
the symlinked path doesn't actually exist.