Reviewed shell code according PR comments

Thanks again to @graemechristie for feedback on #21
Updated the shell code to use the same way of handling
the separator than the powershell code.