Python Check If Relative Path Cannot Be Assigned