[Galaxy S 4 General] carl1961:
Thank's mhammadleo that fixed the script for working, but I think you meant chmod 777 ./tools/simg2img

I did these all:

chmod 777 ./rebuild_system

chmod 777 ./build_rom

chmod 777 ./build_kernel

chmod 777 ./build_modem

chmod 777 ./build_csc

chmod 777 ./tools/make_ext4fs

chmod 777 ./tools/simg2img

My Results:

carl@carl-OEM ~ $ cd root
carl@carl-OEM ~/root $ ls
build_csc build_rom Quick Guide.txt source tools
build_kernel output rebuild_system system
build_modem param.cfg root system_image
carl@carl-OEM ~/root $ ./rebuild_system stdout
[sudo] password for carl:

---------------------------------------------------
--- Odin System Image Builder v1.3 (C) Gaz 2013 ---
---------------------------------------------------

Converting: 'system.img.ext4' from Sparse EXT4 Image to Standard EXT4 Image...
Okay!

Loop Mounting './system_image/system.img.ext4' to './system' Folder...
Okay!

Rooting 'system.img.ext4'...

system/xbin/[
system/xbin/[[
system/xbin/ash
system/xbin/awk
system/xbin/base64
system/xbin/basename
system/xbin/blkid
system/xbin/bunzip2
system/xbin/bzcat
system/xbin/bzip2
system/xbin/cal
system/xbin/cat
system/xbin/chat
system/xbin/chattr
system/xbin/chgrp
system/xbin/chmod
system/xbin/chown
system/xbin/chroot
system/xbin/chrt
system/xbin/cksum
system/xbin/clear
system/xbin/comm
system/xbin/cp
system/xbin/cpio
system/xbin/crond
system/xbin/crontab
system/xbin/cut
system/xbin/date
system/xbin/dd
system/xbin/depmod
system/xbin/devmem
system/xbin/df
system/xbin/diff
system/xbin/dirname
system/xbin/dmesg
system/xbin/dnsd
system/xbin/dnsdomainname
system/xbin/dos2unix
system/xbin/dpkg
system/xbin/dpkg-deb
system/xbin/du
system/xbin/echo
system/xbin/egrep
system/xbin/env
system/xbin/ether-wake
system/xbin/expand
system/xbin/expr
system/xbin/fakeidentd
system/xbin/fbset
system/xbin/fdflush
system/xbin/fdformat
system/xbin/fdisk
system/xbin/fgrep
system/xbin/find
system/xbin/fold
system/xbin/free
system/xbin/freeramdisk
system/xbin/fsck
system/xbin/fsync
system/xbin/ftpd
system/xbin/ftpget
system/xbin/ftpput
system/xbin/getopt
system/xbin/grep
system/xbin/groups
system/xbin/gunzip
system/xbin/gzip
system/xbin/hd
system/xbin/head
system/xbin/hexdump
system/xbin/hostid
system/xbin/hostname
system/xbin/httpd
system/xbin/hwclock
system/xbin/id
system/xbin/ifconfig
system/xbin/ifenslave
system/xbin/inetd
system/xbin/inotifyd
system/xbin/insmod
system/xbin/install
system/xbin/ionice
system/xbin/iostat
system/xbin/ip
system/xbin/ipaddr
system/xbin/ipcalc
system/xbin/iplink
system/xbin/iproute
system/xbin/iprule
system/xbin/iptunnel
system/xbin/kill
system/xbin/killall
system/xbin/killall5
system/xbin/less
system/xbin/ln
system/xbin/logname
system/xbin/losetup
system/xbin/ls
system/xbin/lsattr
system/xbin/lsmod
system/xbin/lsof
system/xbin/lsusb
system/xbin/lzop
system/xbin/lzopcat
system/xbin/md5sum
system/xbin/microcom
system/xbin/mkdir
system/xbin/mkdosfs
system/xbin/mke2fs
system/xbin/mkfifo
system/xbin/mkfs.ext2
system/xbin/mkfs.vfat
system/xbin/mknod
system/xbin/mkswap
system/xbin/modinfo
system/xbin/modprobe
system/xbin/more
system/xbin/mount
system/xbin/mountpoint
system/xbin/mt
system/xbin/mv
system/xbin/nameif
system/xbin/nanddump
system/xbin/nandwrite
system/xbin/nc
system/xbin/netstat
system/xbin/nice
system/xbin/nmeter
system/xbin/nslookup
system/xbin/ntpd
system/xbin/od
system/xbin/patch
system/xbin/pgrep
system/xbin/pidof
system/xbin/ping
system/xbin/ping6
system/xbin/pkill
system/xbin/pmap
system/xbin/powertop
system/xbin/printenv
system/xbin/printf
system/xbin/ps
system/xbin/pscan
system/xbin/pwd
system/xbin/rdate
system/xbin/rdev
system/xbin/readahead
system/xbin/readlink
system/xbin/realpath
system/xbin/renice
system/xbin/reset
system/xbin/rev
system/xbin/rfkill
system/xbin/rm
system/xbin/rmdir
system/xbin/rmmod
system/xbin/route
system/xbin/run-parts
system/xbin/script
system/xbin/scriptreplay
system/xbin/sed
system/xbin/sendmail
system/xbin/seq
system/xbin/setkeycodes
system/xbin/setlogcons
system/xbin/setsid
system/xbin/sha1sum
system/xbin/sha256sum
system/xbin/sha512sum
system/xbin/showkey
system/xbin/sleep
system/xbin/smemcap
system/xbin/sort
system/xbin/split
system/xbin/stat
system/xbin/strings
system/xbin/stty
system/xbin/sum
system/xbin/swapoff
system/xbin/swapon
system/xbin/sync
system/xbin/sysctl
system/xbin/tac
system/xbin/tail
system/xbin/tar
system/xbin/tee
system/xbin/telnet
system/xbin/telnetd
system/xbin/test
system/xbin/tftp
system/xbin/tftpd
system/xbin/time
system/xbin/timeout
system/xbin/top
system/xbin/touch
system/xbin/tr
system/xbin/traceroute
system/xbin/traceroute6
system/xbin/tty
system/xbin/ttysize
system/xbin/tunctl
system/xbin/umount
system/xbin/uname
system/xbin/uncompress
system/xbin/unexpand
system/xbin/uniq
system/xbin/unix2dos
system/xbin/unlzop
system/xbin/unzip
system/xbin/uptime
system/xbin/usleep
system/xbin/uudecode
system/xbin/uuencode
system/xbin/vconfig
system/xbin/vi
system/xbin/watch
system/xbin/wc
system/xbin/wget
system/xbin/which
system/xbin/who
system/xbin/whoami
system/xbin/whois
system/xbin/xargs
system/xbin/zcat
system/app/Superuser.apk
system/xbin/busybox
system/xbin/su
Okay!

Getting required image size...
Size = 2501M

Rebuilding 'system.img.ext4' as Odin Flashable System Image...

Creating filesystem with parameters:
Size: 2622488576
Block size: 4096
Blocks per group: 32768
Inodes per group: 8016
Inode size: 256
Journal blocks: 10004
Label:
Blocks: 640256
Block groups: 20
Reserved block group size: 159
Created filesystem with 3674/160320 inodes and 543737/640256 blocks
Okay!

Unmounting './system'...
loop: can't delete device /dev/loop0: No such device or address
Okay!

Cleaning up folders...
Okay!

Removing Original 'system.img.ext4' from './source' Folder...
Okay!

Moving Pre-Rooted 'system.img.ext4' to './source' Folder...
Okay!

Finished.

Would you like to make a donation? (y/n):

*********************************************************

Would you like to make a donation? (y/n): n
carl@carl-OEM ~/root $ ./build_rom stdout

----------------------------------------------------
---- Odin ROM Package Builder v1.3 (C) Gaz 2013 ----
----------------------------------------------------

Enter Device Model: SM-N900A
Enter Sales Code: ATT
Enter PDA Version: N900AUCECMGL-ROOT
Enter PHONE Version: N900AUCECMGL
Enter CSC Version: N900AATTCMGL

-----------------------------------------------------
-------- Building '.tar.md5' Odin Package... --------
-----------------------------------------------------

Creating TAR Archive...

aboot.mbn
boot.img
cache.img.ext4
HLTE_USA_ATT.pit
modem.bin
NON-HLOS.bin
persist.img.ext4
recovery.img
rpm.mbn
sbl1.mbn
sdi.mbn
system.img.ext4
tz.mbn
userdata.img.ext4
Okay!

Calculating MD5 Checksum...
Okay!

Moving file to: './output' folder...
Okay!

Odin ROM Package:
'SM-N900A_ATT_SM-N900AN900AUCECMGL-ROOT_SM-N900AN900AUCECMGL_SM-N900AN900AATTCMGL.tar.md5'
Built successfully in './output' folder.

Finished.

Would you like to make a donation? (y/n):