Fix a system args error and simplify the code.

1. Java console args does not include the command name as its first arg, error fixed.
2. Simplify the code and change variables align with qiniu repo implementation.