attempt on fixing relative paths

this fix is dependent on #4 

not sure if all cases are covered here. need review ;)