Update sync.py

correctly resolve paths...