Restore functionality of getName

Check for a string when calling `upload()` & set the name if the `$newName` parameter is a string, otherwise leave it be.
Current behavior:

```php
$file->setName("foo"); // Set the image name to "foo"
$file->upload(); // Upload the image
$file->getName(); // Returns an empty string
```

Fixed behavior:

```php
$file->setName("foo"); // Set the image name to "foo"
$file->upload(); // Upload the image
$file->getName(); // Returns "foo" as expected
```