Update config-path.js

Updated code on suggestion of @vernak2539