It appears that running the curl command does not process the -u parameters correctly. You can reproduce this if you sign up for a twilio account and call:
HTTP/1.1 401 UNAUTHORIZED 317ms
access-control-allow-credentials: true
access-control-allow-headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since
access-control-allow-methods: GET, POST, DELETE, OPTIONS
access-control-allow-origin: *
access-control-expose-headers: ETag
content-type: application/json
date: Sun, 31 Jul 2016 02:54:20 GMT
twilio-request-duration: 0.002
twilio-request-id: RQb1fa69f4011d45f1bd552952a270a886
www-authenticate: Basic realm="Twilio API"
x-powered-by: AT-5000
x-shenanigans: none
content-length: 205
connection: Close
{
"code": 20003,
"detail": "Your AccountSid or AuthToken was incorrect.",
"message": "Authentication Error - No credentials provided",
"more_info": "https://www.twilio.com/docs/errors/20003",
"status": 401
}