Improved sample start/stop script to wait for Solr to terminate and only delete pid file if successful.