Show usage if no arguments.
Put vars into quotes.

Without quotes, `[ $foo = '1' ]` will become

    [ = '1' ]

which will raise an error.
Check variable before getting its value.
`SITE_ID` and `LAB_ID` must not be empty.
Ensure that the parent directory of `TARGET_DIR` exists.
Merge pull request #1 from dochang/bugfix

Bugfixes