Fixed bin path resolving

This may fix some issues on non-windows platforms.