fstests/fsrename: Fix stack corruption

Use snprintf() instead of sprintf().  Include missing header files.