Document expandPath method