diff --git a/Cargo.lock b/Cargo.lock
index a0ced709f752811ba5efd6ce031b9a22dda7ab43..d695d178dcfad7aefa5da6250c75e20b9f0d252d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,14 +1,17 @@
 [[package]]
 name = "ansi_term"
-version = "0.10.2"
+version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
 name = "atty"
-version = "0.2.6"
+version = "0.2.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
  "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -20,12 +23,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "cbindgen"
-version = "0.5.0"
+version = "0.5.1"
 dependencies = [
- "clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "standalone-syn 0.12.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -33,7 +36,7 @@ dependencies = [
 
 [[package]]
 name = "cc"
-version = "1.0.5"
+version = "1.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -43,11 +46,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "clap"
-version = "2.30.0"
+version = "2.31.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -71,7 +74,7 @@ dependencies = [
 name = "ctype"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -84,7 +87,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 name = "errno"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -92,7 +95,7 @@ dependencies = [
 name = "fcntl"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -100,7 +103,7 @@ dependencies = [
 name = "fenv"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -108,7 +111,7 @@ dependencies = [
 name = "float"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "fenv 0.1.0",
  "platform 0.1.0",
 ]
@@ -131,7 +134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 name = "grp"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -151,7 +154,7 @@ dependencies = [
 
 [[package]]
 name = "libc"
-version = "0.2.37"
+version = "0.2.39"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -174,7 +177,7 @@ dependencies = [
 name = "mman"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -205,7 +208,7 @@ name = "parking_lot_core"
 version = "0.2.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -219,10 +222,21 @@ dependencies = [
  "sc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "proc-macro2"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "quote"
-version = "0.3.15"
+version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
 name = "ralloc"
@@ -246,7 +260,7 @@ version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -302,7 +316,7 @@ dependencies = [
 name = "resource"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
  "sys_time 0.1.0",
 ]
@@ -392,46 +406,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 name = "semaphore"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
 [[package]]
 name = "serde"
-version = "1.0.27"
+version = "1.0.29"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.27"
+version = "1.0.29"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive_internals 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_derive_internals"
-version = "0.19.0"
+version = "0.20.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_json"
-version = "1.0.10"
+version = "1.0.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -477,7 +492,7 @@ dependencies = [
 name = "stat"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -485,7 +500,7 @@ dependencies = [
 name = "stdio"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "errno 0.1.0",
  "platform 0.1.0",
  "va_list 0.1.0",
@@ -495,7 +510,7 @@ dependencies = [
 name = "stdlib"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "ctype 0.1.0",
  "errno 0.1.0",
  "platform 0.1.0",
@@ -506,7 +521,7 @@ dependencies = [
 name = "string"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins.git)",
  "errno 0.1.0",
  "platform 0.1.0",
@@ -520,27 +535,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "syn"
-version = "0.11.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "synom"
-version = "0.11.3"
+version = "0.12.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "sys_time"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -567,7 +574,7 @@ name = "termion"
 version = "1.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
  "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
  "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -584,7 +591,7 @@ dependencies = [
 name = "time"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -593,7 +600,7 @@ name = "toml"
 version = "0.4.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -606,11 +613,6 @@ name = "unicode-width"
 version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
-[[package]]
-name = "unicode-xid"
-version = "0.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
 [[package]]
 name = "unicode-xid"
 version = "0.1.0"
@@ -620,7 +622,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 name = "unistd"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -635,7 +637,7 @@ dependencies = [
 name = "va_list-helper"
 version = "0.0.2"
 dependencies = [
- "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -647,7 +649,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 name = "wait"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
  "resource 0.1.0",
 ]
@@ -656,7 +658,7 @@ dependencies = [
 name = "wctype"
 version = "0.1.0"
 dependencies = [
- "cbindgen 0.5.0",
+ "cbindgen 0.5.1",
  "platform 0.1.0",
 ]
 
@@ -690,26 +692,27 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [metadata]
-"checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455"
-"checksum atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8352656fd42c30a0c3c89d26dea01e3b77c0ab2af18230835c15e2e13cd51859"
+"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
+"checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4"
 "checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf"
-"checksum cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9be26b24e988625409b19736d130f0c7d224f01d06454b5f81d8d23d6c1a618f"
+"checksum cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fedf677519ac9e865c4ff43ef8f930773b37ed6e6ea61b6b83b400a7b5787f49"
 "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
-"checksum clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1c07b9257a00f3fc93b7f3c417fc15607ec7a56823bc2c37ec744e266387de5b"
+"checksum clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dc18f6f4005132120d9711636b32c46a233fad94df6217fa1d81c5e97a9f200"
 "checksum compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins.git)" = "<none>"
 "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
 "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
 "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
 "checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c"
 "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
-"checksum libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "56aebce561378d99a0bb578f8cb15b6114d2a1814a6c7949bbe646d968bb4fa9"
+"checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff"
 "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
 "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
 "checksum num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3c2bd9b9d21e48e956b763c9f37134dc62d9e95da6edb3f672cacb6caf3cd3"
 "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
 "checksum parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd9d732f2de194336fb02fe11f9eed13d9e76f13f4315b4d88a14ca411750cd"
 "checksum parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "538ef00b7317875071d5e00f603f24d16f0b474c1a5fc0ccb8b454ca72eafa79"
-"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
+"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0"
+"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408"
 "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
 "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd"
 "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
@@ -722,18 +725,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum rustc-ap-syntax 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b6e525fc674e8a75eaed08a90a6df7adfa73a66135056577722185dd7ca0771"
 "checksum rustc-ap-syntax_pos 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e157f53ad5c4a6cf9ae5b5be15325dd2eeca190c03ab9873cc1460788767e5e9"
 "checksum sc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4ebbb026ba4a707c25caec2db5ef59ad8b41f7ad77cad06257e06229c891f376"
-"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526"
-"checksum serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ba7591cfe93755e89eeecdbcc668885624829b020050e6aec99c2a03bd3fd0"
-"checksum serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e03f1c9530c3fb0a0a5c9b826bdd9246a5921ae995d75f512ac917fc4dd55b5"
-"checksum serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "57781ed845b8e742fc2bf306aba8e3b408fe8c366b900e3769fbc39f49eb8b39"
+"checksum serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4763b773978e495252615e814d2ad04773b2c1f85421c7913869a537f35cb406"
+"checksum serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8ab31f00ae5574bb643c196d5e302961c122da1c768604c6d16a35c5d551948a"
+"checksum serde_derive_internals 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc848d073be32cd982380c06587ea1d433bc1a4c4a111de07ec2286a3ddade8"
+"checksum serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "fab6c4d75bedcf880711c85e39ebf8ccc70d0eba259899047ec5d7436643ee17"
 "checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
 "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
 "checksum standalone-proc-macro2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "04b0e28c7fb04d85743490bd2a24bd0ec0ff6efc74e7c848748fd9fd2b105410"
 "checksum standalone-quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "45bd227b8113ff91db4f6eadcc73928dc602af00a851f4fe65f3c1cb1a96b5e1"
 "checksum standalone-syn 0.12.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d800cb9b3b2e08877667aace544bb0882ea3d5cf3ae83c2730a9032becf1f6bd"
 "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
-"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
-"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
+"checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd"
 "checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e"
 "checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1"
 "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
@@ -741,7 +743,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e"
 "checksum unborrow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e92e959f029e4f8ee25d70d15ab58d2b46f98a17bc238b9265ff0c26f6f3d67f"
 "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
-"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
 "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
 "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
 "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
diff --git a/cbindgen b/cbindgen
index 97ceb5862f397b14c5b63cd60af7f5f345ad065c..fe26d47afd3e959a8cd73f81f430b061d28c4c3b 160000
--- a/cbindgen
+++ b/cbindgen
@@ -1 +1 @@
-Subproject commit 97ceb5862f397b14c5b63cd60af7f5f345ad065c
+Subproject commit fe26d47afd3e959a8cd73f81f430b061d28c4c3b
diff --git a/include/stdint.h b/include/stdint.h
index ade0ab4fed39b790af58885a4fef13095682ef03..faf36934381d9ab36e279bbcb542efe0891c6732 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -49,4 +49,6 @@ typedef int64_t intmax_t;
 #define UINTMAX_MAX UINT64_MAX
 typedef uint64_t uintmax_t;
 
+#define SIZE_MAX UINT64_MAX
+
 #endif /* _STDINT_H */
diff --git a/include/sys/stat.h b/include/sys/stat.h
deleted file mode 100644
index 97836d36b0c98f591924a3791dd675753bc2ecb1..0000000000000000000000000000000000000000
--- a/include/sys/stat.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _STAT_H
-#define _STAT_H
-
-#include <sys/types.h>
-
-struct stat {
-  dev_t st_dev;
-  ino_t st_ino;
-  nlink_t st_nlink;
-  mode_t st_mode;
-  uid_t st_uid;
-  gid_t st_gid;
-  dev_t st_rdev;
-  off_t st_size;
-  blksize_t st_blksize;
-  time_t st_atim;
-  time_t st_mtim;
-  time_t st_ctim;
-};
-
-int chmod(const char *path, mode_t mode);
-
-int fchmod(int fildes, mode_t mode);
-
-int fstat(int fildes, struct stat *buf);
-
-int lstat(const char *path, struct stat *buf);
-
-int mkdir(const char *path, mode_t mode);
-
-int mkfifo(const char *path, mode_t mode);
-
-int mknod(const char *path, mode_t mode, dev_t dev);
-
-int stat(const char *file, struct stat *buf);
-
-mode_t umask(mode_t mask);
-
-#endif /* _STAT_H */
diff --git a/src/resource/cbindgen.toml b/src/resource/cbindgen.toml
index f9c595b682de5be84f518a4cb8fcd2c1e2a098bc..788d105537cead2894f82a9ca6f85657dc1065da 100644
--- a/src/resource/cbindgen.toml
+++ b/src/resource/cbindgen.toml
@@ -1,6 +1,7 @@
-sys_includes = ["sys/types.h"]
+sys_includes = ["sys/types.h", "sys/time.h"]
 include_guard = "_SYS_RESOURCE_H"
 language = "C"
+style = "Tag"
 
 [enum]
 prefix_with_name = true
diff --git a/src/stat/build.rs b/src/stat/build.rs
index 74a9a42fe9884469a1fe3e598c65b4179da6b0f6..0d79f3cce8e33284573c5102281cdec82917729a 100644
--- a/src/stat/build.rs
+++ b/src/stat/build.rs
@@ -3,11 +3,9 @@ extern crate cbindgen;
 use std::{env, fs};
 
 fn main() {
-    /*
-     *let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-     *fs::create_dir_all("../../target/include").expect("failed to create include directory");
-     *cbindgen::generate(crate_dir)
-     *  .expect("failed to generate bindings")
-     *  .write_to_file("../../target/include/sys/stat.h");
-     */
+    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
+    fs::create_dir_all("../../target/include").expect("failed to create include directory");
+    cbindgen::generate(crate_dir)
+        .expect("failed to generate bindings")
+        .write_to_file("../../target/include/sys/stat.h");
 }
diff --git a/src/stat/cbindgen.toml b/src/stat/cbindgen.toml
index d4f38953dbe8afa0f97c39791403b2ac7df5ae95..58eced99e18054bb142092c186cdd97f5be66cf4 100644
--- a/src/stat/cbindgen.toml
+++ b/src/stat/cbindgen.toml
@@ -1,6 +1,7 @@
 sys_includes = ["sys/types.h"]
 include_guard = "_SYS_STAT_H"
 language = "C"
+style = "Tag"
 
 [enum]
 prefix_with_name = true
diff --git a/src/sys_time/src/lib.rs b/src/sys_time/src/lib.rs
index d56c5755a2823155225202165eef4fab4856027a..fc03634d3a619556ec3c71f49b3b274e8d038cad 100644
--- a/src/sys_time/src/lib.rs
+++ b/src/sys_time/src/lib.rs
@@ -23,10 +23,12 @@ pub struct fd_set {
     pub fds_bits: [c_long; 16usize],
 }
 
+#[no_mangle]
 pub extern "C" fn getitimer(which: c_int, value: *mut itimerval) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub extern "C" fn setitimer(
     which: c_int,
     value: *const itimerval,
@@ -35,10 +37,12 @@ pub extern "C" fn setitimer(
     unimplemented!();
 }
 
+#[no_mangle]
 pub extern "C" fn gettimeofday(tp: *mut timeval, tzp: *const c_void) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub extern "C" fn select(
     nfds: c_int,
     readfds: *mut fd_set,
@@ -49,6 +53,7 @@ pub extern "C" fn select(
     unimplemented!();
 }
 
+#[no_mangle]
 pub extern "C" fn utimes(path: *const c_char, times: [timeval; 2]) -> c_int {
     unimplemented!();
 }
diff --git a/test.sh b/test.sh
index 27f033bb6326016a7e1480e2a30fd9e67380229e..1e6d7b819ac637d79c68985d9001e169474109b7 100755
--- a/test.sh
+++ b/test.sh
@@ -4,10 +4,7 @@ set -ex
 cargo build
 cargo build --manifest-path src/crt0/Cargo.toml
 
-cd openlibm
-make
-cd ..
+CFLAGS=-fno-stack-protector make -C openlibm
 
-cd tests
-make clean
-make run
+make -C tests clean
+make -C tests run
diff --git a/tests/.gitignore b/tests/.gitignore
index d0bc0d66b343fcc3e240bfbcf4eb4d1a286f25a5..6cfb8396be3a812afe7c47d4c3e7b4af7639e310 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,3 +1,4 @@
+/*.out
 /gen/
 /alloc
 /args
@@ -6,19 +7,15 @@
 /brk
 /chdir
 /create
-/create.out
 /ctype
 /dup
-/dup.out
 /error
 /fchdir
 /fcntl
 /fsync
 /ftruncate
-/ftruncate.out
 /getid
 /link
-/link.out
 /math
 /mem
 /setid
@@ -37,3 +34,4 @@
 /string/strspn
 /unlink
 /write
+
diff --git a/tests/Makefile b/tests/Makefile
index 8a626402c063dec9558d912e76b33b1d0906d024..a2528896058cbcc1690c00a79b65746959f760c9 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,10 +1,9 @@
-BINS=\
-	alloc \
+# Binaries that should generate the same output every time
+EXPECT_BINS=\
 	atof \
 	atoi \
 	brk \
 	args \
-	chdir \
 	create \
 	ctype \
 	dup \
@@ -13,14 +12,12 @@ BINS=\
 	fcntl \
 	fsync \
 	ftruncate \
-	getid \
 	link \
 	math \
 	mem \
 	pipe \
 	printf \
 	rmdir \
-	setid \
 	sleep \
 	sprintf \
 	stdlib/strtol \
@@ -33,38 +30,46 @@ BINS=\
 	unlink \
 	write
 
+# Binaries that may generate varied output
+BINS=\
+	$(EXPECT_BINS) \
+	alloc \
+	chdir \
+	getid \
+	setid
+
 all: $(BINS)
 
 clean:
 	rm -f $(BINS) *.out
 
 run: $(BINS)
-	for bin in $(BINS); \
+	for bin in $^; \
 	do \
 		echo "# $${bin} #"; \
-		"./$${bin}" test args; \
+		"./$${bin}" test args || exit $$?; \
 	done
 
-expected: $(BINS)
+expected: $(EXPECT_BINS)
 	rm -rf expected
 	mkdir -p expected
-	for bin in $(BINS); \
+	for bin in $^; \
 	do \
 		echo "# $${bin} #"; \
 		mkdir -p expected/`dirname $${bin}`; \
-		"./$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr"; \
+		"./$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr" || exit $$?; \
 	done
 
-verify: $(BINS)
+verify: $(EXPECT_BINS)
 	rm -rf gen
 	mkdir -p gen
-	for bin in $(BINS); \
+	for bin in $^; \
 	do \
 		echo "# $${bin} #"; \
 		mkdir -p gen/`dirname $${bin}`; \
-		"./$${bin}" test args > "gen/$${bin}.stdout" 2> "gen/$${bin}.stderr"; \
-		diff -u "gen/$${bin}.stdout" "expected/$${bin}.stdout"; \
-		diff -u "gen/$${bin}.stderr" "expected/$${bin}.stderr"; \
+		"./$${bin}" test args > "gen/$${bin}.stdout" 2> "gen/$${bin}.stderr" || exit $$?; \
+		diff -u "gen/$${bin}.stdout" "expected/$${bin}.stdout" || exit $$?; \
+		diff -u "gen/$${bin}.stderr" "expected/$${bin}.stderr" || exit $$?; \
 	done
 
 GCCHEAD=\
diff --git a/tests/expected/alloc.stdout b/tests/expected/alloc.stdout
deleted file mode 100644
index 74753f94e3cfa3f1e9b0374f2f82e4dff032316f..0000000000000000000000000000000000000000
--- a/tests/expected/alloc.stdout
+++ /dev/null
@@ -1,2 +0,0 @@
-malloc 0x55ac6c472618
-calloc 0x55ac6c472618
diff --git a/tests/expected/chdir.stdout b/tests/expected/chdir.stdout
deleted file mode 100644
index 6d79e11be0b87900d32ef232c49b0b99fc526f48..0000000000000000000000000000000000000000
--- a/tests/expected/chdir.stdout
+++ /dev/null
@@ -1,2 +0,0 @@
-initial cwd: /home/jeremy/Projects/relibc/tests
-final cwd: /home/jeremy/Projects/relibc
diff --git a/tests/expected/getid.stdout b/tests/expected/getid.stdout
deleted file mode 100644
index a51fd84a302264be258b90f328bf59ade1eacb18..0000000000000000000000000000000000000000
--- a/tests/expected/getid.stdout
+++ /dev/null
@@ -1 +0,0 @@
-egid: 1000, euid: 1000, gid: 1000, pgid: 23916, pid: 23933, ppid 23918, uid 1000
diff --git a/tests/expected/link.stderr b/tests/expected/link.stderr
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..77bae796be4e0982a074f9e15bc5baabf261addc 100644
--- a/tests/expected/link.stderr
+++ b/tests/expected/link.stderr
@@ -0,0 +1 @@
+link: File exists
diff --git a/tests/expected/math.stdout b/tests/expected/math.stdout
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..087a3bdf0e486d698e31bf34178b934b84d42b37 100644
--- a/tests/expected/math.stdout
+++ b/tests/expected/math.stdout
@@ -0,0 +1 @@
+cos(3.14) = -0.9999987483024597
diff --git a/tests/expected/alloc.stderr b/tests/expected/mem.stderr
similarity index 100%
rename from tests/expected/alloc.stderr
rename to tests/expected/mem.stderr
diff --git a/tests/expected/mem.stdout b/tests/expected/mem.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..d2f4e1f86ec9b2367d23dbc1c82b655439e1e757
--- /dev/null
+++ b/tests/expected/mem.stdout
@@ -0,0 +1,3 @@
+# mem #
+Correct memchr
+Correct memccpy
diff --git a/tests/expected/sleep.stderr b/tests/expected/sleep.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..df935fdb39f9f41840a583e4fdec38abea5c601a
--- /dev/null
+++ b/tests/expected/sleep.stderr
@@ -0,0 +1,3 @@
+sleep: Success
+usleep: Success
+nanosleep: Success
diff --git a/tests/expected/chdir.stderr b/tests/expected/sleep.stdout
similarity index 100%
rename from tests/expected/chdir.stderr
rename to tests/expected/sleep.stdout
diff --git a/tests/expected/getid.stderr b/tests/expected/sprintf.stderr
similarity index 100%
rename from tests/expected/getid.stderr
rename to tests/expected/sprintf.stderr
diff --git a/tests/fcntl.out b/tests/expected/sprintf.stdout
old mode 100755
new mode 100644
similarity index 100%
rename from tests/fcntl.out
rename to tests/expected/sprintf.stdout
diff --git a/tests/expected/stdlib/a64l.stderr b/tests/expected/stdlib/a64l.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/expected/stdlib/a64l.stdout b/tests/expected/stdlib/a64l.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..18c83b1ed91bcb0e0f21533435e84e0299fca763
--- /dev/null
+++ b/tests/expected/stdlib/a64l.stdout
@@ -0,0 +1,2 @@
+Correct a64l: azAZ9. = 194301926
+Correct a64l: azA = 53222
diff --git a/tests/expected/stdlib/strtol.stderr b/tests/expected/stdlib/strtol.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/expected/stdlib/strtol.stdout b/tests/expected/stdlib/strtol.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..6f53efcf016a5266713fea60f59ee08b7ec08180
--- /dev/null
+++ b/tests/expected/stdlib/strtol.stdout
@@ -0,0 +1,12 @@
+-42
+555
+1234567890
+-42
+555
+1234567890
+38acf
+abcdef12
+731
+731
+0
+0
diff --git a/tests/expected/string/strchr.stderr b/tests/expected/string/strchr.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/expected/string/strchr.stdout b/tests/expected/string/strchr.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..5a72f0ea5c79b91a7f2263eca9295643f818f052
--- /dev/null
+++ b/tests/expected/string/strchr.stdout
@@ -0,0 +1,3 @@
+ello
+ld
+
diff --git a/tests/expected/string/strcspn.stderr b/tests/expected/string/strcspn.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/expected/string/strcspn.stdout b/tests/expected/string/strcspn.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..2b24e3127788ab5dd07d265a75dd56cfd6c495b8
--- /dev/null
+++ b/tests/expected/string/strcspn.stdout
@@ -0,0 +1,2 @@
+2
+6
diff --git a/tests/expected/string/strncmp.stderr b/tests/expected/string/strncmp.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/expected/string/strncmp.stdout b/tests/expected/string/strncmp.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..e385d8a988feac6214a67c2d9f00a627193662a5
--- /dev/null
+++ b/tests/expected/string/strncmp.stdout
@@ -0,0 +1,6 @@
+-97
+-195
+1
+-255
+-2
+0
diff --git a/tests/expected/string/strrchr.stderr b/tests/expected/string/strrchr.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/expected/string/strrchr.stdout b/tests/expected/string/strrchr.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..fdeaa3bc75d219c3cc46ae1dac3ce5cb9adc8b25
--- /dev/null
+++ b/tests/expected/string/strrchr.stdout
@@ -0,0 +1 @@
+strrch PASS, exiting with status code 0
diff --git a/tests/expected/string/strspn.stderr b/tests/expected/string/strspn.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/expected/string/strspn.stdout b/tests/expected/string/strspn.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..54d9c92604bdf51ba30d3337d868def47df2f4fb
--- /dev/null
+++ b/tests/expected/string/strspn.stdout
@@ -0,0 +1,3 @@
+5
+1
+0
diff --git a/tests/expected/unlink.stderr b/tests/expected/unlink.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..19e51d7f6725bb6c3e0b76c64db1151f500299b9
--- /dev/null
+++ b/tests/expected/unlink.stderr
@@ -0,0 +1 @@
+unlink: File exists
diff --git a/tests/expected/unlink.stdout b/tests/expected/unlink.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/link.c b/tests/link.c
index 383575e8ce60e3a7d7fd57b71e2cb9b7d41f7c8e..4df0dfde2f7b7a3ebdc2c828efeb317e900ef0e8 100644
--- a/tests/link.c
+++ b/tests/link.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <unistd.h>
 
 int main(int argc, char** argv) {
diff --git a/tests/math.c b/tests/math.c
index 159bb14ced82f66c6c9cc7b4929fee90e5e0163d..981300fdeff56909cb8d6b0cca56594f6026fc7f 100644
--- a/tests/math.c
+++ b/tests/math.c
@@ -1,5 +1,8 @@
 #include <math.h>
+#include <stdio.h>
 
 int main(int argc, char ** argv) {
-    float c = cos(3.14);
+    double pi = 3.14;
+    float c = cos(pi);
+    printf("cos(%f) = %f\n", pi, c);
 }