Solving problem for very long paths when using screen

This problem was mentioned on stackoverflow 
and issued as #7