Fix upgrade error
Merge branch 'fix_upgrade_error' of https://github.com/terrencehan/rebar into terrencehan-fix_upgrade_error
Additional fixes and modification

- Updating documentation to be more accurate
- Style fixes
- More precise error messages
Merge branch 'terrencehan-fix_upgrade_error'