Update the object cache/properties only when action is successful.

 Previously some object properties were being set before the event
 (change label/purge), and if that event threw an exception for some reason,
 the object would have a incorrect value, or not be present in the cache.
Fix and some reworking so that Tuque leaves no temp files behind.
Merge pull request #41 from nigelgbanks/1.x-update-cache-on-successful-purge

Update the object cache/properties only when action is successful.
Merge pull request #42 from jordandukart/1.x

Fix and some reworking so that Tuque leaves no temp files behind.
Fix removal of RDF literals.
Merge pull request #43 from adam-vessey/1.x

Fix removal of RDF literals.
Fix flattenDocument() to return values.

As taken from GitHub, flattenDocument() returns a data structure where the values are blank.  See Islandora-Dev message https://groups.google.com/d/topic/islandora-dev/A_ajiI6stnA/discussion for details.
PHP 5.4+ issue

SimpleXML objects seem to be handled differently in 5.4+
Merge pull request #44 from mitchmac/1.x

PHP 5.4+ issue
added additional namespaces, removed invalid param
Merge branch '1.x' of github.com:Islandora/tuque into 1.x
sanitized inputs
Add check for writing temp files.

If $this->cookieFile = tempnam(sys_get_temp_dir(), 'curlcookie'); fails,
the problem isn't seen until saveCookiesToSession() when
$this->cookieFile is a boolean null instead of a file name.  This
adds a check to createCookieFile() to make sure the cookie file
in the temporary directory can be created.
Merge remote-tracking branch 'origin/1.x' into 1.x

Conflicts:
	FedoraApiSerializer.php
added return value to pergeObject
added method to access user attributes from Fedora's FeSL 'user' servlet
additional documentation of the userAttributes method
Merge pull request #45 from lyrasis/1.x

Test for valid temporary file.
Fixed FoxmlDocument not respecting versioning

FoxmlDocument wasn't correcly setting the versioning
flag on datastreams. This was causing any object created
in Tuque using FoxmlDocument to have its datastreams set
to non-versionable.

The fix was a simple error serializing the output of a
boolean to XML. PHP was outputting 1 or 0 for true or
false, while the foxml was expecting true or false. Any
other value was interperated as false.
Merge branch '1.x' of github.com:Islandora/tuque into 1.x