Execute scripts when entering or leaving directories