Return realpath for canonpath when possible