Improve service path detection

WindowsAzure#612