Improve the robustness of unmount_partitions()

Wait for child process to terminate and introduced 2 seconds sleep.