Use drupal_realpath(), to help ensure that the ftruncate() will work.

Looks like the "temporary://" stream wrapper that Drupal includes does
not support ftruncate()...  Resolving the URI to a file works, though.
Merge pull request #21 from adam-vessey/7.x

Use drupal_realpath(), to help ensure that the ftruncate() will work.