Remove unnecessary "/" when testing php native functions.
Skip ftruncate on php 5.3, because it is not supported.