[API] Support for `single-instance` when start app in folder. Fix #515.