Move realpath fallback in Solr script into #1055