Move path code into path.py

Add impassible terrain checking and usage of tiles