bugfix to file truncation using bad real file system path when protocol present in string