Elasticsearch startup script supports directories containing spaces

Closes #3712