Title: Don't strip part after dot if source is directory
Added some safeguards against path length limit