Fix build scripts in dev-dependencies

Don't return dev-dependencies as dependencies for non-test targets as they're
not actually dependencies!
auto merge of #1020 : alexcrichton/cargo/issue-885-round-2, r=brson

Don't return dev-dependencies as dependencies for non-test targets as they're
not actually dependencies!
Merge remote-tracking branch 'upstream/master'