replaced cin with getline

replace cin with getline to ensure that paths containing spaces will not
create issues.