Fix an issue application crashes on copying sampleScript folder (fix #125)