Update PhotosFragment.java

put file write operation into background task.