Answering Regular Path Queries over SQ Ontologies